<?php
/*
 * Created on Feb 24, 2008
* @author max
*/
include_once(dirname(__FILE__).'/../database/dbWeeks.php');
class testdbWeeks extends UnitTestCase {
	function testdbWeeksModule() {
		$dates[0] = new RMHDate("03-31-08",null,"","");
		for ($i=1; $i<=6; $i++)
			$dates[] = new RMHDate("04-0".$i."-08",null,"","");
		$w=new Week($dates,1,1,1,"unpublished");
		$this->assertTrue(insert_dbWeeks($w));
		$w->set_status("published");
		$this->assertTrue(update_dbWeeks($w));
		$w2=get_dbWeeks("03-31-08");
		$this->assertTrue($w2->get_status()=="published");
		$this->assertTrue(delete_dbWeeks($w));

		echo "testdbWeeks complete";
	}
}
?>
